package cn.yy.fascade.logging;

import cn.yy.common.web.SecurityUtil;
import cn.yy.logging.entity.LoggingAccessInfo;
import cn.yy.logging.resolver.LoggingDetailHandler;
import org.springframework.stereotype.Component;

@Component
public class MyLoggingDetailHandler implements LoggingDetailHandler {

    @Override
    public void loggingUserDeltail(LoggingAccessInfo loggingAccessInfo) {
        loggingAccessInfo.setUserId(SecurityUtil.getUserId());
        loggingAccessInfo.setUsername(SecurityUtil.getUsername());
        loggingAccessInfo.setRealname(SecurityUtil.getRealname());
    }
}
